
package com.egene.zh.activity.contact;

import com.easemob.easeui.ui.EaseChatFragment;
import com.egene.zh.R;

public enum ContactTab {
    LEAVE_MESSAGE(0,R.string.frame_title_leave_message, LeaveMessageFragment_.class),
    CONTACT_ONLINE(1, R.string.frame_title_contact_online, ContactOnlineFragment_.class);
//    CONTACT_ONLINE(1, R.string.frame_title_contact_online, EaseChatFragment.class);

    private Class<?> clz;
    private int idx;
    private int title;

    private ContactTab(int idx, int title, Class<?> clz) {
        this.idx = idx;
        this.clz = clz;
        this.setTitle(title);
    }

    public static ContactTab getTabByIdx(int idx) {
        for (ContactTab t : values()) {
            if (t.getIdx() == idx)
                return t;
        }
        return LEAVE_MESSAGE;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getIdx() {
        return idx;
    }

    public void setIdx(int idx) {
        this.idx = idx;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

}
